package lesson17.car;

import lesson14.Person;

public class Car {
	protected String model;
	private double maxSpeed;
	protected double currentSpeed;
	protected int currentGear;
	protected int numberOfDoors;
	private long idNumber;
	protected boolean isSportCar;
	protected Person owner;
	
	protected String type = "Just a car";
	
	Car(int maxSpeed)
	{
		this.maxSpeed = maxSpeed;
	}
/*	void setMaxSpeed(double maxSpeed)
	{
		this.maxSpeed = maxSpeed; 
	}
	*/
/*	double getMaxSpeed()
	{
		return this.maxSpeed;
	}
	*/
	protected void changeOwner(Person newOwner)
	{
		this.owner = newOwner;
	}
	protected void strartEngine()
	{
		this.currentGear = 1;
		System.out.println("Engeni sterted! Brum!");
	}
	protected void ChnageGear(int gear)
	{
		this.currentGear = gear;
	}
	protected void accelerate(double speed)
	{
		if(currentSpeed + speed > maxSpeed)
			currentSpeed = maxSpeed;
		else
			
		currentSpeed += speed;
		System.out.println("Now drivae at" + currentSpeed + "km/h");
	}
}
